import { Element } from '../../../fieldType'
import commonField from '../../../propertyPanel/commonConfig'
export const fields = [
  { label: '服务项目', value: 'name' },
  { label: '销售价', value: 'price' },
  { label: '说明', value: 'description' },
  { label: '使用数量', value: 'count' },
  { label: '总价', value: 'totalPrice' }
]
export const fieldsMap = {
  name: '服务项目',
  price: '销售价',
  description: '说明',
  count: '使用数量',
  totalPrice: '总价',
  oper: '操作'
}
export interface AssociateSpareElement extends Element {
  displayField: any[],
  width: number
}
function formListFactory () {
  return [
    commonField.name,
    commonField.attrCode,
    { label: '展示字段', name: 'displayField', type: 'slot' },
    commonField.width
  ]
}
const formList = formListFactory()
const formTemplate: AssociateSpareElement = {
  attrCode: '',
  businessId: '',
  name: '关联服务',
  fieldType: 'associateService',
  displayField: [],
  width: 1
}
export default {
  formList,
  formTemplate
}
